<template>
    <div id='webviewer' ref='viewer'></div>
</template>
  
<script>
/* eslint-disable */
export default {
    name: 'WebViewer',
    props: {
        path: String,
        url: String
    },
    mounted: function () {
        import('@pdftron/webviewer').then(() => {

            WebViewer({
                // path: '../webviewer',
                initialDoc: 'https://zhikujiapu.oss-cn-hangzhou.aliyuncs.com/linandifangwenxianshujukuxitongoss-01_02_01_00009_临安年鉴1994-01_02_01_00009_临安年鉴1994-25.pdf', // replace with your own PDF file
            }, this.$refs.viewer).then((instance) => {
                // call apis here
                console.log('webViewerInstance.UI ==', instance.UI)
                console.log('webViewerInstance.core ==', instance.Core)
            });
        })
    }
}
</script>
  
  
<style>
#webviewer {
    height: 100vh;
}
</style>